﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FlatRedBall;
using FlatRedBall.Math.Geometry;

namespace TopDownShooter
{
    class Box : PositionedObject
    {
        AxisAlignedRectangle m_Rectangle;
        public AxisAlignedRectangle Rectangle { get { return m_Rectangle; } set { m_Rectangle = value; } }
        public Box()
        {
            m_Rectangle = ShapeManager.AddAxisAlignedRectangle();
            m_Rectangle.ScaleX = m_Rectangle.ScaleY = 4;
            m_Rectangle.AttachTo(this, false);
        }

        public void onBulletCollide(Bullet b)
        {
            b.Destroy();
        }
        public void Destroy()
        {
            ShapeManager.Remove(m_Rectangle);
            m_Rectangle.RemoveSelfFromListsBelongingTo();
            RemoveSelfFromListsBelongingTo();
        }
    }
}
